package com.design.mediator;

/**
 * @author cxx
 * @create 2020-04-20 17:47
 **/
public class Main {

    public static void main(String[] args) {

        Colleague  pa = new ConcreteColleagueA();
        Colleague  pb = new ConcreteColleagueB();
        Mediator  pm = new ConcreteMediator();
        pm.register ("A",pa);
        pm.register ("B",pb);
        pa.sendMsg ("aaaaa","A","B");
        pb.sendMsg ("bbbbb","B","A");
    }

}
